<template>
  <div class='full-screen-loading' v-show='show'>
    <div class="loading">
      <img class='loading-bg' :src="require('@/assets/img/eam/loading-bg.png')" alt="">
      <img class='roller' :src="require('@/assets/img/eam/loading.png')" alt="">
      <span>LOADING...</span>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      show: true
    }
  },
  methods: {
    loading() {
      this.show = true;
    },
    close() {
      this.show = false;
    }
  }
}
</script>

<style lang="scss" scoped>
@keyframes roll {
  0% {
    transform: translate(-50%, -50%) rotate(0);

  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes toggle {
  0% {
    opacity: 0.5;

  }
  100% {
    opacity: 1;
  }
}

.full-screen-loading {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(2, 17, 51, .9);
  z-index: 1000;

  .loading {
    position: fixed;
    width: 295px;
    height: 297.06px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .loading-bg {
    position: absolute;
    width: 420px;
    height: 100%;
    top: 0;
    left: 0;
  }

  .roller {
    width: 107.38px;
    height: 107.38px;
    position: absolute;
    top: 50%;
    left: 36%;
    transform: translate(-50%, -50%);
    animation: roll 3s linear 0s infinite;
  }

  span {
    position: absolute;
    font-family: FZLanTingHeiS-B-GB;
    font-style: normal;
    font-weight: normal;
    font-size: 14px;
    line-height: 15px;
    /* identical to box height */

    display: flex;
    align-items: center;
    text-align: right;
    letter-spacing: 1px;

    color: #FFFFFF;
    top: 50%;
    right: 0;
    transform: translate(119px, -121%);
    animation: toggle 2s ease 0s infinite alternate;
  }
}
</style>
